You can integrate the Ditto SDK into Kotlin projects to develop for the Android platform.
minSdk
version 23
compileSdk
version 34
mavenCentral()
is in the project-level build.gradle
:tools:targetApi
attribute causes the permission to only be requested on devices running the specified API level or higher. This avoids errors on older OS versions that do not recognize the permission.
The android:maxSdkVersion
attribute causes that permission to only be requested on devices running the specified SDK level or lower. This avoids asking for more permissions than Ditto needs, however it will prevent your app from being able to request the permission on devices running a newer OS version. To opt out of this behavior and request the permission on all OS versions, see the following snippet:
<manifest>
tag as shown in the AndroidManifest.xml example above.
This will configure your app’s build to ignore the android:maxSdkVersion attribute in our SDK allowing the permission to be requested on any SDK version. This techniquie can be used to tweak any permissions to your liking.
For more details, see the documentation for the Bluetooth and WiFi Aware permissions in the Android Documentation.